use uuid::Uuid;

use crate::player::id::PlayerId;

#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct EntityId(Uuid);

impl EntityId {
    pub fn random() -> Self {
        Self(Uuid::now_v7())
    }
}

impl From<PlayerId> for EntityId {
    fn from(value: PlayerId) -> Self {
        Self(value.into_inner())
    }
}
